import * as types from "./mutation-types";
const mutations = {
  // 设置设备信息
  [types.SET_SYSTEMINFO](state, systemInfo) {
    state.systemInfo = systemInfo
  },
  // 设置导航栏信息
  [types.SET_SCLIENTRECT](state, clientRect) {
    state.clientRect = clientRect
  },
  // 是否完善授权
  [types.SET_AUTH](state, isAuth) {
    state.showAuthModa = !isAuth
  },
  // 设置用户信息
  [types.SET_USERINFO](state, userInfo) {
    state.userInfo = userInfo
  },
  // 设置用户token
  [types.SET_TOKEN](state, api_token) {
    state.api_token = api_token
  },
  // 设置用户选中服务类型
  [types.SET_USER_TYPES](state, userTypes) {
    state.userTypes = userTypes
  },
  // 设置用户选中服务类型某一个项
  [types.SET_USER_TYPES_INDEX](state, {index, type}) {
    state.userTypes[index] = type
  },
  // 设置用户搜索类型
  [types.SET_USER_TYPES_SEARCH](state, searchType) {
    state.searchType = searchType
  },
  // 设置广告信息
  [types.SET_AD_LIST](state, adList) {
    state.adList = adList
  },
};

export default mutations;